<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<title>vue2.x</title>
</head>

<body>
	<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

	<div id="app">
		<ol>
			<li v-for="todo in todos">
				{{ todo.text }}
			</li>
		</ol>
		<button v-on:click="pushTodoItem">push todo</button>
	</div>
	<script>
		var app = new Vue({
			el: '#app',
			data: {
				todos: [
					{ text: new Date().toLocaleString() }, 
					{ text: new Date().toLocaleString() }
				]
			},
			methods: {
				pushTodoItem: function () {
					app.$data.todos.push({
						text: new Date().toLocaleString()
					})
				}
			}
		})
	</script>
</body>

</html>